package com.nmh.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * <p>
 *
 * </p>
 *
 * @author yoki
 * @since 2023-12-19
 */
@Data
@Getter
@Setter
@ApiModel(value = "圈舍对象", description = "")
public class Enclosure implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 圈舍id
     */
    @ApiModelProperty("圈舍id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 圈舍名称
     */
    @ApiModelProperty("圈舍名称")
    @NotNull(message = "不能为空")
    @Length(max = 50,message = "长度最多为50")
    private String circleName;

    /**
     * 存栏量
     */
    @ApiModelProperty("圈舍存栏量")
    @NotNull(message = "不能为空")
    private Integer inventory;

    /**
     * 牧场id
     */
    @ApiModelProperty("牧场id")
    @NotNull(message = "不能为空")
    private Integer pastureId;

   
    private Integer state;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;


}
